/**
 * @param {string} word1
 * @param {string} word2
 * @return {string}
 */
 var mergeAlternately = function(word1, word2) {
  let len = word1.length>word2.length?word2.length:word1.length
  let res = ''
  for(let i=0;i<len;i++){
  res+=word1[i]
  res+=word2[i]

  }
  if(word1.length>len)res+=word1.slice(len,word1.length)
  if(word2.length>len) res+=word2.slice(len,word2.length)
  return res
};